//
//  ZCExercise.m
//  QuickCare
//
//  Created by 莫振春 on 16/7/12.
//  Copyright © 2016年 lidabiao. All rights reserved.
//

#import "ZCExercise.h"
#import "SemiCircleProgressView.h"
#import "SCBarCell.h"   

@interface ZCExercise ()<UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UIView *centerView;

@property (weak, nonatomic) IBOutlet UITableView *tableVIew;

@end

@implementation ZCExercise

static NSString *reuseIdentifierBar = @"SCBarCell";


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    SemiCircleProgressView *progress = [[SemiCircleProgressView alloc]initWithFrame:CGRectMake(25 , 0, 150, 150)];
    
    progress.percent = 0.8;
    
    self.tableVIew.dataSource = self;
    
    [self.tableVIew registerClass:[SCBarCell class] forCellReuseIdentifier:reuseIdentifierBar];
    
    self.tableVIew.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    self.tableVIew.backgroundColor = [UIColor grayColor];
    
    [self.centerView addSubview:progress];
    
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return  1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    SCBarCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifierBar forIndexPath:indexPath];
    if (!cell) {
        cell = [[SCBarCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifierBar];
    }
    [cell configUI:indexPath];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (IBAction)restClickButton:(id)sender {
//     [self performSegueWithIdentifier:@"push" sender:nil];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    
    
    return 300;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
